package com.cloudcross.ssp.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.cloudcross.ssp.model.Banner;
import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.common.utils.Pager;

/**
 * 投放活动对应创意表的服务接口
 *
 * @author wuqiang.du
 */
public interface IBannerService extends IGenericService<Banner> {
    int countByAdGroupId(Long adGroupId);

    //定义复制模板方法
    boolean cloneBanner(Map<String, Object> paramMap);

    boolean edit(Map<String, Object> paramMap);

    boolean updata(Banner t);

    boolean updateSupdated(List<Long> adGroupIdList, Date date);

    boolean updateSupdatedByOrderId(List<Long> orderIdList, Date date);

    boolean updateStatusByOrderId(List<Long> orderIdList, int status);

    boolean updateStatusByAdGroupId(List<Long> adGroupIdList, int status);

    int countByParams1(Map<String, Object> paramMap);

    List<Banner> findByParams1(Map<String, Object> paramMap, Pager pager);

    List<Banner> findByParams1(Map<String, Object> paramMap);

    boolean updateStatus1(List<Long> idList, int status);

    void updateBannerUrlByCondition(List<Long> idList, String click, String impression, String visit);

    List<Long> queryBannerIdByAdgroupId(Long adgroupId);

    boolean copyBannerBetch(long orderId, long oldadgroupId, long newadgroupId, long supdated);

    /**
     * 获取策略相关创意个数
     *
     * @param long
     * @return int
     */
    int getBannerCountByAdgroupId(Long adgroupId);

    List<Banner> getBannerListByAdGroupId(Long adGroupId);
}
